<#import "../tpl/pageTep.ftl" as page>

  <link href="https://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="${staticpath}/base/bootstrap-select.css">
<style>
    .bootstrap-select:not([class*="span"]):not([class*="col-"]):not([class*="form-control"]) {
        width: 288px;
    }

    .btn {
        padding: 0px 12px;
        height: 30px !important;
        line-height: 30px !important;
        font-size: 14px !important;
        color: #333 !important;
        background-color: #ebebeb !important;
        border-color: #adadad !important;
    }

    .dropdown-menu {
        width: 318px;
    }

    .form-control {
        height: 24px;
        padding: 4px 4px 4px 0px;
    }

    .bootstrap-select-searchbox {
        padding: 4px 8px 4px 4px;
    }

    .bootstrap-select.btn-group .dropdown-menu.inner {
        height: 250px;
    }

    .bui-dialog {
        top: 650px !important;
    }
</style>

<@page.pageBase currentMenu="业务组工作台">
<div class="xm-product">
    <div class="row">
        <div class="panel">
            <div class="panel-header">
                <a href="/rest/manage/proxy/toList" onclick="removeProject()">返回上一级</a>
            </div>
            <div class="panel-body demo-content">
                <div class="panel-body" style="padding-top:0px;">
                    <form id="addForm" class="form-horizontal" action="${basepath}/rest/manage/proxy/insertProxy"
                          method="post">
                        <h3>客户信息</h3>
                        <hr>
                        <div class="control-group">
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    客户名称：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8" id="customerName">
                                    <div class="autoName" id="autoScreening">
                                    </div>
                                </div>
                            </div>
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    客户地址：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8 address" disabled>
                                </div>
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    负责人：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8 linkman" disabled>
                                </div>
                            </div>
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    联系电话：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8 linkPhone" disabled>
                                </div>
                            </div>
                        </div>
                        <h3>受检单位的信息</h3>
                        <hr>
                        <div class="control-group">
                            <label class="control-label" style="width: 180px;">
                                <s>*</s>
                                是否与客户信息一致：
                            </label>
                            <div class="controls bui-form-group-select">
                                <select class="input-small" id="isCustomer" name="isCustomer">
                                    <option value="" disabled selected>请选择类型</option>
                                    <option value="y">是</option>
                                    <option value="n">否</option>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    单位名称：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8"
                                           data-rules="{required : true}" name="checkCompanyName" id="checkCompanyName"
                                           autocomplete="off">

                                </div>
                            </div>
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    单位地址：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8"
                                           data-rules="{required : true}" name="checkCompanyAddress"
                                           id="checkCompanyAddress" autocomplete="off">
                                </div>
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    负责人：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8"
                                           data-rules="{required : true}" name="checkCompanyLinkman"
                                           id="checkCompanyLinkman" autocomplete="off">

                                </div>
                            </div>
                            <div class="pull-left">
                                <label class="control-label">
                                    <s>*</s>
                                    联系电话：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span8"
                                           data-rules="{required : true}" name="checkCompanyLinkphone"
                                           id="checkCompanyLinkphone" autocomplete="off">
                                </div>
                            </div>
                        </div>
                        <h3>合同信息</h3>
                        <hr>
                        <div class="control-group customerType">
                            <label class="control-label">
                                <s>*</s>
                                客户类别：
                            </label>
                            <div class="controls bui-form-group-select">
                                <select class="input-small" id="customerCategory">
                                    <option value="" disabled selected>请选择类型</option>
                                    <option value="正式合同">正式合同</option>
                                    <option value="临时合同">临时合同</option>
                                </select>
                            </div>
                        </div>
                        <div>
                            <div class="temporaryContract" style="display: none;height: auto;overflow: hidden;">
                                <label class="control-label" style="padding-top:0px;">
                                    <s>*</s>
                                    合同名称：
                                </label>
                                <div class="controls temporaryControls">

                                </div>
                            </div>
                            <div class="proTime" style="display: none;height: auto;overflow: hidden;"><label class="control-label"
                                                                               style="padding-top:0px;"><s>*</s>
                                合同日期：</label>
                                <div class="controls"><input type="text" class="calendar" style="width:100px;"/></div>
                            </div>
                        </div>
                        <input type="hidden" name="contractID" value="" class="contractID">
                        <div class="formalContract">
                            <div class="control-group">
                                <div class="pull-left">
                                    <label class="control-label">
                                        <s>*</s>
                                        合同编号：
                                    </label>
                                    <div class="controls">
                                        <input type="text" class="control-text span-width span8" id="contractSno"
                                               placeholder="请填写合同编号" autocomplete="off">
                                        <div class="autoName" id="contractScreening">
                                        </div>
                                    </div>
                                </div>
                                <div class="pull-left">
                                    <label class="control-label">
                                        <s>*</s>
                                        合同名称：
                                    </label>
                                    <div class="controls">
                                        <input type="text" class="control-text span-width span8 contractName" disabled>
                                    </div>
                                </div>
                            </div>
                            <div class="control-group">
                                <div class="pull-left">
                                    <label class="control-label">
                                        <s>*</s>
                                        合同金额：
                                    </label>
                                    <div class="controls">
                                        <input type="text" class="control-text span-width span8 contractMoney" disabled>
                                    </div>
                                </div>
                                <div class="pull-left">
                                    <label class="control-label">
                                        预付款：
                                    </label>
                                    <div class="controls">
                                        <input type="text" class="control-text span-width span8 contractPayMoney"
                                               disabled>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <h3>委托书信息</h3>
                        <hr>
                        <div class="control-group">
                            <label class="control-label">
                                <s>*</s>
                                委托书名称：
                            </label>

                            <div class="controls">

                                <input type="text" class="control-text span-width span8" name="name"
                                       placeholder="请填写委托书名称"
                                       data-rules="{required : true}" autocomplete="off"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                <s>*</s>
                                采取区域：
                            </label>
                            <div class="controls bui-form-group-select" data-type="city">
                                <select class="input-small" name="province">
                                    <option value="" disabled selected>请选择省份</option>
                                </select>&nbsp;&nbsp;
                                <select class="input-small" name="city">
                                    <option value="" disabled selected>请选择市</option>
                                </select>&nbsp;&nbsp;
                                <select class="input-small" name="area">
                                    <option value="" disabled selected>请选择区</option>
                                </select>
                            </div>
                        </div>
                        <hr>
                        <div class="control-group">
                            <label class="control-label">
                                检测类别：
                            </label>
                            <div class="controls bui-form-group-select">
                                <select class="input-small" name="testType" >
                                    <option value="" disabled selected>请选择类别</option>
                                    <option value="委托书检测">委托书检测</option>
                                    <option value="送样检测">送样检测</option>
                                    <option value="验收检测">验收检测</option>
                                    <option value="清洁生产检测">清洁生产检测</option>
                                    <option value="环评检测">环评检测</option>
                                    <option value="排污检测">排污检测</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <h3 class="offset2">项目报价
                            <a class="button button-primary pull-right" href="javascript:addProject()">新增</a>
                        </h3>
                        <hr>
                        <div id="projectGrid" class="xm-grid">
                        </div>
                        <div class="control-group">
                            <div class="pull-left">
                                <label class="control-label">
                                    优惠价：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span5"
                                           data-rules="{required : true}" name="proxyMoney" autocomplete="off">

                                </div>
                            </div>
                            <div class="pull-left">
                                <label class="control-label">
                                    预付款：
                                </label>
                                <div class="controls">
                                    <input type="text" class="control-text span-width span5"
                                           data-rules="{required : true}" name="proxyPayMoney" autocomplete="off">
                                </div>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">
                                费用总合计：
                            </label>
                            <div class="controls">
                                (项目费+住宿费+加急费+0.06*(采样费 + 检测费))
                            </div>
                        </div>
                        <div class="centered">
                            <a class="button  button-large  button-success" id="saveBtn">保存</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<#-----------------------------------------------添加商品规格的弹出框------------------------------------------->
<div id="addProContent" style="display:none;">
    <form id="addProForm" class="form-horizontal">
        <div class="row">
            <div class="control-group span16">
                <label class="control-label">检测对象：</label>
                <div class="controls">
                    <input type="text" class=" control-text  span8" id="projectObjectName" autocomplete="off"/>
                    <div class="autoName" id="objScreening">
                    </div>
                </div>
            </div>
            <div class="control-group span16">
                <label class="control-label">检测项目：</label>
                <div class="controls">
                    <select id="proScreening" class="selectpicker" data-live-search="true" multiple></select>
                </div>
            </div>

            <div class="control-group span16">
                <label class="control-label">检测次数：</label>
                <div class="pull-left">
                    <label class="s-label control-label">点数：</label>
                    <input type="text" class="s-input control-text" id="testPointAmount"
                           data-rules="{required : true,number:true}" autocomplete="off"/>
                </div>
                <div class="pull-left">
                    <label class="s-label control-label">频数：</label>
                    <input type="text" class="s-input control-text" id="testFrequency"
                           data-rules="{required : true,number:true}" autocomplete="off"/>

                </div>
                <div class="pull-left">
                    <label class=" s-label control-label">天数：</label>
                    <input type="text" class="s-input control-text" id="testDayAmount"
                           data-rules="{required : true,number:true}" autocomplete="off"/>
                </div>
            </div>
            <div class="control-group span16">
                <label class="control-label">点位名称：</label>
                <div class="controls">
                    <input type="text" class=" control-text span8" id="testPointName"
                           data-rules="{required : true}" autocomplete="off"/>
                </div>
            </div>
        </div>
    </form>
</div>
<script src="https://g.alicdn.com/bui/bui/1.1.21/bui.js"></script>
  <script src="https://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="${staticpath}/base/bootstrap-select.js"></script>

<script type="text/javascript">
    var Grid = BUI.Grid;
    var Store = BUI.Data.Store;
    var Data = BUI.Data;
    var Select = BUI.Select;
    var addForm = new BUI.Form.Form({
        srcNode: '#addForm',
        submitType: 'ajax',
        callback: function (data) {
            if (data.success == true) {
                window.location.href = "${basepath}/rest/manage/proxy/toList";
            } else {
                alert(data.message);
            }
        }
    }).render();


    /*********************************模糊查询客户信息的客户名称,并显示客户的其他信息*************************/
    $('#customerName').keyup(function () {
        var val = $(this).val();
        val.length < 0 ? $("#autoScreening").hide() : $("#autoScreening").show() && queryName(val);
    });

    //查询客户名称
    function queryName(name) {
        $.ajax({
            type: 'GET',
            url: '/rest/manage/customer/selectAllList',
            dataType: 'json',
            data: {
                name: name
            },
            success: function (data) {
                var list = data.data, html = '';
                $.each(list, function (i, e) {
                    html += '<div class="auto-customer" data-id="' + e.id + '">' + e.name + '</div>'
                });
                $("#autoScreening").html(html);
                //点击模糊查询的名称
                $(".auto-customer").click(function () {
                    var name = $(this).text(),
                            id = $(this).attr('data-id');
                    $("#customerName").val(name);
                    querycustomer(id);//查询客户列表
                    querySno(id);//查询客户信息
                    customerTemporaryID = id;
                    $("#autoScreening").hide();
                })
            }
        });
    }

    //查询客户信息
    function querycustomer(id) {
        $.ajax({
            type: 'GET',
            url: '/rest/manage/customer/selectDetail',
            dataType: 'json',
            data: {
                id: id
            },
            success: function (data) {
                $(".address").val(data.data.address);
                $(".linkman").val(data.data.linkman);
                $(".linkPhone").val(data.data.linkPhone);

            }
        });
    }

    /*********************************是选择和客户信息一样，就对应客户信息，不是情况下，自己手动填写相关信息*************************/
    $("#isCustomer").change(function () {
        var type = $(this).val();
        if (type == "y") {
            $('#checkCompanyName').val($("#customerName").val());
            $('#checkCompanyName').attr('readonly', true);
            $('#checkCompanyAddress').val($(".address").val());
            $('#checkCompanyAddress').attr('readonly', true);
            $('#checkCompanyLinkphone').val($(".linkPhone").val());
            $('#checkCompanyLinkphone').attr('readonly', true);
            $('#checkCompanyLinkman').val($(".linkman").val());
            $('#checkCompanyLinkman').attr('readonly', true);
        } else {
            $('#checkCompanyName').val('');
            $('#checkCompanyName').attr('readonly', false);
            $('#checkCompanyAddress').val('');
            $('#checkCompanyAddress').attr('readonly', false);
            $('#checkCompanyLinkphone').val('');
            $('#checkCompanyLinkphone').attr('readonly', false);
            $('#checkCompanyLinkman').val('');
            $('#checkCompanyLinkman').attr('readonly', false);
        }
    });
    /*********************************根据合同类型，在正式合同的情况下，显示出客户信息的id查出合同信息的编码,并显示合同的其他信息，临时合同隐藏合同信息*************************/
    $("#customerCategory").change(function () {
        var type = $(this).val(), html = "", timeHtml = "";
        if (type == "正式合同") {
            $(".formalContract").show();
            $(".temporaryContract").hide();
            $(".temporaryName").remove();
            $(".proTime").hide();
        } else {
            $(".formalContract").hide();
            $(".temporaryContract").show();
            html = '<input type="text" class="control-text span-width span8 temporaryName" placeholder="请输入合同名称" name="temporaryName" >';
            $(".temporaryControls").html(html);
            $(".proTime").show();

        }
    });
    $('#contractSno').focus(function () {
        $("#contractScreening").show();
    });
    var customerTemporaryID = "";//声明临时合同的id
    //查询客户名称
    function querySno(customerID) {
        $.ajax({
            type: 'GET',
            url: '/rest/manage/contract/selectAllList',
            dataType: 'json',
            data: {
                type: '正式合同',
                customerID: customerID
            },
            success: function (data) {
                var list = data.data, html = '';
                $.each(list, function (i, e) {
                    html += '<div class="auto-screening-prompt" data-id="' + e.id + '">' + e.sno + '</div>'
                });
                $("#contractScreening").html(html);
                //点击模糊查询的名称
                $(".auto-screening-prompt").click(function () {
                    var sno = $(this).text(),
                            id = $(this).attr('data-id');
                    $("#contractSno").val(sno);
                    queryContract(id);
                    queryMoneyAmount(id);//查询合同剩余总金额
                    queryPayMoney(id);//查询合同剩余预付款金额

                    $("#contractScreening").hide();
                })
            }
        });
    }

    //查询合同信息
    function queryContract(id) {
        $.ajax({
            type: 'GET',
            url: '/rest/manage/contract/selectDetail',
            dataType: 'json',
            data: {
                id: id
            },
            success: function (data) {
                $(".contractName").val(data.data.name);
                $(".contractMoney").val(data.data.contractMoney);
                $(".contractPayMoney").val(data.data.contractPayMoney);
                $("input[name='contractID']").val(id);
            }
        });
    }

    //查询合同剩余总金额
    var MoneyAmount = "", payAmount = "";

    function queryMoneyAmount(id) {
        $.ajax({
            type: 'GET',
            url: '/rest/manage/contract/selectSurplusMoney',
            dataType: 'json',
            data: {
                id: id
            },
            success: function (data) {
                $("input[name='proxyMoney']").attr('placeholder', '剩余合同金额' + data.data + '');
                MoneyAmount = data.data;

            }
        });
    }

    //查询合同剩余预付款金额
    function queryPayMoney(id) {
        $.ajax({
            type: 'GET',
            url: '/rest/manage/contract/selectSurplusPayMoney',
            dataType: 'json',
            data: {
                id: id
            },
            success: function (data) {
                $("input[name='proxyPayMoney']").attr('placeholder', '剩余预付款金额"' + data.data + '"');
                payAmount = data.data;
            }
        });
    }

    /*********************************项目报价的列表*************************/
    /**
     * 项目报价信息
     * @type {*[]}
     */
    var proColumns = [
        {title: '检测对象', dataIndex: 'categoryName', elCls: "center"},
        {title: '检测项目', dataIndex: 'projectName', elCls: "center"},
        {title: '点数', dataIndex: 'testPointAmount', elCls: "center"},
        {title: '频数', dataIndex: 'testFrequency', elCls: "center"},
        {title: '天数', dataIndex: 'testDayAmount', elCls: "center"},
        {title: '点位名称', dataIndex: 'testPointName', elCls: "center"},
        {
            title: '操作', dataIndex: 'id', elCls: "center", renderer: function (data) {
                return '<a href="javascript:delPro(\'' + data + '\')">删除</a>';
            }
        }
    ];
    var proStore = new Store({
        url: '${basepath}/rest/manage/proxytestproject/selectTestProjectList',
        autoLoad: true, //自动加载数据
        root: 'data'
    });
    var proGrid = new Grid.Grid({
        render: '#projectGrid',
        forceFit: true,
        columns: proColumns,
        store: proStore
    });
    proGrid.render();

    /**
     * 删除规格信息--不是放在数据库中，而是显示在列表上的用bui的remove实现
     * @param index
     */
    function delPro(id) {
        BUI.Message.Confirm('确定要执行删除操作？', function () {
            $.ajax({
                type: "POST",
                url: "${basepath}/rest/manage/proxytestproject/deleteJson",
                dataType: "json",
                data: {
                    id: id
                },
                success: function (data) {
                    var obj = new Object();
                    obj.start = 0; //返回第一页
                    proStore.load(obj);
                }
            });
        }, 'question');
    }

    /*----------------------------------------------新增项目报价表单处理 begin------------------------------------*/

    /**
     *规格新增按钮事件
     */


    $('#projectObjectName').focus(function () {
        $('#objScreening').show();
    });
    $('#project').focus(function () {
        $('#proScreening').show();
    });

    $(".selectpicker").selectpicker({
        noneSelectedText: '请选择'
    });
    $(window).on('load', function () {
        $('.selectpicker').selectpicker('val', '');
        $('.selectpicker').selectpicker('refresh');
    });
    var ids = "";
    //查询检测对象的列表
    (function () {
        $.ajax({
            type: 'GET',
            url: '/rest/manage/testprojectcategory/selectAllList',
            dataType: 'json',
            success: function (data) {
                var list = data.data, html = '';
                $.each(list, function (i, e) {
                    html += '<div class="auto-screening" data-id="' + e.id + '">' + e.name + '</div>'
                });
                $("#objScreening").html(html);
                //点击模糊查询的名称
                $(".auto-screening").click(function () {
                    $("#project").val("");
                    var name = $(this).text(),
                            id = $(this).attr('data-id');
                    $("#projectObjectName").val(name);
                    queryPro(id);
                    $("#objScreening").hide();

                });

            }
        });
    })();

    //查询检测项目
    function queryPro(categoryID) {

        $.ajax({
            type: 'GET',
            url: '/rest/manage/testproject/selectAllList',
            dataType: 'json',
            data: {
                categoryID: categoryID
            },
            success: function (data) {
                var list = data.data, html = '';
                var select = $("#proScreening");
                $.each(list, function (i, e) {
                    html += "<option value='" + e.id + "'>" + e.name + "</option>";
                });
                select.html(html);
                $('.selectpicker').selectpicker('val', '');
                $('.selectpicker').selectpicker('refresh');
                $("#proScreening").change(function () {
                    ids = $(this).val();
                });
            }
        });
    }


    var addProForm = new BUI.Form.Form({
        srcNode: '#addProForm',
        submitType: 'ajax',
        callback: function (data) {
            addProDialog.close();
        }
    }).render();
    var addProDialog = new BUI.Overlay.Dialog({
        title: '新增报价项目',
        width: 500,
        height: 300,
        contentId: 'addProContent',
        success: function () {
            if (addProForm.isValid()) {
                $.ajax({
                    type: 'POST',
                    url: '/rest/manage/proxytestproject/insertTestProjects',
                    dataType: 'json',
                    data: {
                        ids: ids,
                        testPointAmount: $("#testPointAmount").val(),
                        testFrequency: $("#testFrequency").val(),
                        testDayAmount: $("#testDayAmount").val(),
                        testPointName: $("#testPointName").val()
                    },
                    success: function (data) {
                        addProDialog.close();
                        var obj = new Object();
                        obj.start = 0; //返回第一页
                        proStore.load(obj);

                    }
                });
            } else {
                addProForm.valid();
            }
        }
    });

    function addProject() {
        //新增规格的时候获取的表单为空
        $("#testPointAmount").val("");
        $("#testFrequency").val("");
        $("#testDayAmount").val("");
        $("#testPointName").val("");
        $("#projectObjectName").val("");
        addProDialog.show();
        $('.selectpicker').selectpicker('val', '');
        $('.selectpicker').selectpicker('refresh');
    }


    /*----------------------------------------------新增项目报价表单处理 end------------------------------------*/
    /*********************************点击保存，如果是临时合同，添加合同*************************/
    //点击保存按钮，判断
    $("#saveBtn").click(function () {
        if($('#customerCategory').val()==''){
            BUI.Message.Alert('客户类别没有填写', function () {
            }, 'info');
            return false;
        }
        if ($('#customerCategory').val() == '临时合同') {
            if($("input[name='temporaryName']").val()==''){
                BUI.Message.Alert('合同名称没有填写', function () {
                }, 'info');
                return false;
            }
            if($(".calendar").val()==''){
                BUI.Message.Alert('合同日期没有填写', function () {
                }, 'info');
                return false;
            }
            queryInsert();
        } else {
            if ($("input[name='proxyMoney']").val() > MoneyAmount) {
                BUI.Message.Alert('剩余合同金额' + MoneyAmount + '', function () {
                }, 'info');
                return false;
            }
            if ($("input[name='proxyPayMoney']").val() > payAmount) {
                BUI.Message.Alert('剩余预付款金额' + payAmount + '', function () {
                }, 'info');
                return false;
            }
            if (addForm.isValid()) {
                addForm.ajaxSubmit();
            } else {
                addForm.valid();
            }
        }
    });

    function queryInsert() {
        if (addForm.isValid()) {
            $.ajax({
                type: 'post',
                url: '${basepath}/rest/manage/contract/insertContract',
                dataType: 'json',
                data: {
                    type: '临时合同',
                    name: $(".temporaryName").val(),
                    customerID: customerTemporaryID,
                    contractTime: $(".calendar").val()
                },
                success: function (data) {
                    $("input[name='contractID']").val(data.data);
                    addForm.ajaxSubmit();
                }
            })
        } else {
            addForm.valid();
        }
    }

    //离开本页面删除未保存检测列表
    window.onbeforeunload = function () {
        removeProject();
    };

    //返回上一级删除没保存的列表
    function removeProject() {
        $.ajax({
            type: 'POST',
            url: '${basepath}/rest/manage/proxytestproject/deleteTestProjects',
            dataType: 'json',
            success: function () {

            }
        });
    }

    BUI.use('bui/calendar', function (Calendar) {
        var datepicker = new Calendar.DatePicker({
            trigger: '.calendar',
            autoRender: true
        });
    });
</script>

</@page.pageBase>
